//-----------------------------------------------配置区----------------------------------------------

//路由简称 - 方便替换路径
var routes = {
	home: '/power-on/index',
	login: '/power-on/login',
	userIndex: '/power-on/user/index',
	recharge: '/power-on/recharge',
	loginSkip: 'home',
	//
	// login: '/common/login',
	// login: '/common/login-by-email',
}

var apiUrl = 'https://apis.mbuymart.com';
var fileUrl = 'https://apis.mbuymart.com/';
//
// var apiUrl = 'http://sky.com';
// var fileUrl = 'http://sky.com/';

var appInfo = {
	name: 'Power On',
	logoUrl: '/static/power-bank/logo.png',
};
//公共路由
const commonRoute = [
	//共享充电宝
	'/pages/power-on/login',
	'/pages/power-on/login-by-sms',
	'/pages/power-on/index',
	'/pages/power-on/msg',
	'/pages/power-on/notice',
	'/pages/power-on/lang',
	//公共
	'/pages/common/login',
	'/pages/common/login-by-sms',
	'/pages/common/login-by-email',
	//商城
	'/pages/shop/list',
	'/pages/shop/detail',
	//示例
	'/pages/demo/widget',
	'/pages/demo/admin',
];
//会员路由 
//null时：除公共路由外全部禁止
const userRoute = null;
//-----------------------------------------------配置区----------------------------------------------

//web环境下自动使用当前域名
// #ifdef H5
var request_full = window.document.location.href; //origin
if (request_full.indexOf('://localhost') == -1) {
	var apiUrl = window.document.location.origin;
	var fileUrl = window.document.location.origin;
}
// #endif

//公共变量
var $var = {
	appInfo: appInfo,
	platform: '', //平台
	size: {}, //屏幕尺寸
	deviceId: '', //设备编号
	lang: '', //语言
	encrypt: false, //请求加密
	//秘钥
	miyao: {
		a: '1234567891234567',
		b: '1234567891234567',
	},
	wechart_applet: { //小程序参数
		openid: '',
	},
	apiUrl: apiUrl, //
	fileUrl: fileUrl,
	qiniu: { //七牛参数
		uploadUrl: "https://upload.qiniup.com/",
		tokenUrl: '/common/qiniu/upload-token',
	},
	commonRoute: commonRoute,
	userRoute: userRoute,
	routes: routes,
	auto_info: null, //用户令牌
	user_info: null, //用户信息
	housing_info: null, //房屋信息
	shop_info: null, //用户名信息
	page_params: {}, //页面参数
	reload: {},
	currency: '$',
};







// 暴露属性和方法
export default $var;